home *** CD-ROM | disk | FTP | other *** search
- UseCoordinates(PIXEL)
- UseBackGround(TRANSPARENT,192,192,192)
- WinGetActive(Win$)
- Set Caption$ = "Bar#3"
-
- {one instance only}
- WinExist(Caption$,Res)
- If Res = 0 Then Goto One_Instance
- WinSetActive(Caption$,Res)
- End
- {endif}
-
- One_Instance:
- InfoMenu(REMOVE)
- WaitInput(100)
- SetMenu()
- DirGet(SourceDir$)
- WinTitle(Win$,Caption$)
- WinVersion(Major,Minor,Build)
- If Major = 4
- WinLocate(Caption$,550,55,728,153,Res)
- Else
- WinLocate(Caption$,550,55,720,145,Res)
- Endif
-
- WinShow(Caption$,TOPMOST,Res)
- Set Icnname1$ = SourceDir$ + "\btn1.bmp"
- Set Icnname2$ = SourceDir$ + "\btn2.bmp"
- Set Icnname3$ = SourceDir$ + "\btn3.bmp"
- Set Icnname4$ = SourceDir$ + "\btn4.bmp"
- Set Icnname5$ = SourceDir$ + "\btn5.bmp"
- Set Icnname6$ = SourceDir$ + "\btn6.bmp"
- Set Icnname7$ = SourceDir$ + "\btn7.bmp"
- Set Icnname8$ = SourceDir$ + "\btn8.bmp"
- Set Icnname9$ = SourceDir$ + "\btn9.bmp"
- Set Icnnameh$ = SourceDir$ + "\btnh.bmp"
- Set IcnnameT$ = SourceDir$ + "\pxltools.bmp"
- GoSub DrawButtons
-
- Wait_for_Input:
- DrawBitmap(1,1,IcnnameT$)
- WaitInput()
-
-
- Close:
- End
-
-
- Btn_01:
- DrawBitmap(1,1,Icnname1$)
- WaitInput(200)
- Goto Wait_for_Input
- Btn_02:
- DrawBitmap(34,1,Icnname2$)
- WaitInput(200)
-
- Goto Wait_for_Input
- Btn_03:
- DrawBitmap(67,1,Icnname3$)
- WaitInput(200)
-
- Goto Wait_for_Input
- Btn_04:
- DrawBitmap(100,1,Icnname4$)
- WaitInput(200)
-
- Goto Wait_for_Input
-
- Btn_05:
- DrawBitmap(133,1,Icnname5$)
- WaitInput(200)
-
- Goto Wait_for_Input
-
- Btn_06:
- DrawBitmap(1,34,Icnname6$)
- WaitInput(200)
-
- Goto Wait_for_Input
- Btn_07:
- DrawBitmap(34,34,Icnname7$)
- WaitInput(200)
-
- Goto Wait_for_Input
- Btn_08:
- DrawBitmap(67,34,Icnname8$)
- WaitInput(200)
-
- Goto Wait_for_Input
- Btn_09:
- DrawBitmap(100,34,Icnname9$)
- WaitInput(200)
-
- Goto Wait_for_Input
-
- Btn_10:
- DrawBitmap(133,34,Icnnameh$)
- WaitInput(200)
- MessageBox(OK,1,EXCLAMATION,
- "The buttons on this floating toolbar were created using
- a series of 16 color bitmaps, and set to TOPMOST. Only
- the left mouse is enabled in this example, and the buttons
- have been programmed just to click in and out. These buttons
- can be programmed to start any other application.
-
- To close this window, use Alt-F4.",
- "Floating toolbars with bitmapped buttons",Res)
-
- Goto Wait_for_Input
-
-
- DrawButtons: {Subroutine}
- SetMouse( 1,1,32,32,Btn_01,X,Y,
- 34,1,65,32,Btn_02,X,Y,
- 67,1,98,32,Btn_03,X,Y,
- 100,1,131,32,Btn_04,X,Y,
- 133,1,164,32,Btn_05,X,Y,
- 1,34, 32,66,Btn_06,X,Y,
- 34,34, 65,66,Btn_07,X,Y,
- 67,34, 98,66,Btn_08,X,Y,
- 100,34,131,66,Btn_09,X,Y,
- 133,34,164,66,Btn_10,X,Y)
- Return
-
-
-